home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / cg.lha / cg / m2c / Scanner.c < prev    next >
C/C++ Source or Header  |  1992-11-24  |  55KB  |  1,912 lines

  1. #include "SYSTEM_.h"
  2.  
  3. #ifndef DEFINITION_Checks
  4. #include "Checks.h"
  5. #endif
  6.  
  7. #ifndef DEFINITION_System
  8. #include "System.h"
  9. #endif
  10.  
  11. #ifndef DEFINITION_General
  12. #include "General.h"
  13. #endif
  14.  
  15. #ifndef DEFINITION_Positions
  16. #include "Positions.h"
  17. #endif
  18.  
  19. #ifndef DEFINITION_IO
  20. #include "IO.h"
  21. #endif
  22.  
  23. #ifndef DEFINITION_DynArray
  24. #include "DynArray.h"
  25. #endif
  26.  
  27. #ifndef DEFINITION_Strings
  28. #include "Strings.h"
  29. #endif
  30.  
  31. #ifndef DEFINITION_Source
  32. #include "Source.h"
  33. #endif
  34.  
  35. #ifndef DEFINITION_System
  36. #include "System.h"
  37. #endif
  38.  
  39. #ifndef DEFINITION_StringMem
  40. #include "StringMem.h"
  41. #endif
  42.  
  43. #ifndef DEFINITION_Strings
  44. #include "Strings.h"
  45. #endif
  46.  
  47. #ifndef DEFINITION_Idents
  48. #include "Idents.h"
  49. #endif
  50.  
  51. #ifndef DEFINITION_Texts
  52. #include "Texts.h"
  53. #endif
  54.  
  55. #ifndef DEFINITION_Tree
  56. #include "Tree.h"
  57. #endif
  58.  
  59. #ifndef DEFINITION_Sets
  60. #include "Sets.h"
  61. #endif
  62.  
  63. #ifndef DEFINITION_Positions
  64. #include "Positions.h"
  65. #endif
  66.  
  67. #ifndef DEFINITION_Errors
  68. #include "Errors.h"
  69. #endif
  70.  
  71. #ifndef DEFINITION_Scanner
  72. #include "Scanner.h"
  73. #endif
  74.  
  75. INTEGER Scanner_CurArg, Scanner_ArgCount;
  76. INTEGER Scanner_TokenLength;
  77. Scanner_tScanAttribute Scanner_Attribute;
  78. struct Scanner_2 Scanner_ScanTabName;
  79. PROC Scanner_Exit;
  80.  
  81. #define TokIdentifier    1
  82. #define TokInteger    2
  83. #define TokString    3
  84. #define TokTargetCode    4
  85. #define TokCode    5
  86. #define TokWhiteSpace    7
  87. #define TokAfter    24
  88. #define TokBefore    25
  89. #define TokBegin    10
  90. #define TokCheck    26
  91. #define TokClose    11
  92. #define TokDeclare    12
  93. #define TokDemand    28
  94. #define TokEnd    13
  95. #define TokEval    14
  96. #define TokExport    15
  97. #define TokFor    71
  98. #define TokFunction    6
  99. #define TokGlobal    16
  100. #define TokIgnore    72
  101. #define TokImport    30
  102. #define TokInherited    34
  103. #define TokInput    31
  104. #define TokLeft    37
  105. #define TokLocal    18
  106. #define TokModule    19
  107. #define TokNone    39
  108. #define TokOutput    32
  109. #define TokParser    35
  110. #define TokPrec    36
  111. #define TokProperty    70
  112. #define TokRemote    76
  113. #define TokReverse    21
  114. #define TokRight    38
  115. #define TokRule    22
  116. #define TokScanner    77
  117. #define TokSelect    74
  118. #define TokStack    20
  119. #define TokSubunit    75
  120. #define TokSynthesized    33
  121. #define TokThread    27
  122. #define TokTree    23
  123. #define TokView    78
  124. #define TokVirtual    17
  125. #define TokLParent    40
  126. #define TokRParent    41
  127. #define TokLBracket    42
  128. #define TokRBracket    43
  129. #define TokLBrace    44
  130. #define TokRBrace    45
  131. #define TokComma    46
  132. #define TokSemiColon    47
  133. #define TokDot    48
  134. #define TokColon    49
  135. #define TokEqual    50
  136. #define TokBar    51
  137. #define TokAssign    52
  138. #define TokPlus    53
  139. #define TokMinus    54
  140. #define TokAsterisk    55
  141. #define TokSlash    56
  142. #define TokLAngle    57
  143. #define TokRAngle    58
  144. #define TokRArrow    59
  145. #define TokCopy    60
  146. #define TokArrow    61
  147. #define TokLArrow    62
  148. static INTEGER NestingLevel;
  149. static Positions_tPosition Position;
  150. #define yyTabSpace    8
  151. #define yyDNoState    0
  152. #define yyFileStackSize    16
  153. #define yyInitBufferSize    (1024 * 8 + 256)
  154. #define yyFirstCh    '\0'
  155. #define yyLastCh    ((CHAR)'\177')
  156. #define yyEolCh    '\n'
  157. #define yyEobCh    ((CHAR)'\177')
  158. #define yyDStateCount    292
  159. #define yyTableSize    3035
  160. #define yyEobState    91
  161. #define yyDefaultState    92
  162. #define STD    1
  163. #define comment    3
  164. #define Str1    5
  165. #define Str2    7
  166. #define CStr1    9
  167. #define CStr2    11
  168. #define targetcode    13
  169. #define expr    15
  170. typedef SHORTCARD yyTableElmt;
  171. typedef yyTableElmt yyStateRange;
  172. typedef yyTableElmt yyTableRange;
  173. typedef struct S_1 {
  174.     yyStateRange Check, Next;
  175. } yyCombType;
  176. typedef yyCombType *yyCombTypePtr;
  177. typedef struct S_2 {
  178.     CHAR A[1000000 + 1];
  179. } *yytChBufferPtr;
  180. typedef CHAR yyChRange;
  181. static struct S_3 {
  182.     LONGCARD A[yyDStateCount + 1];
  183. } yyBasePtr;
  184. static struct S_4 {
  185.     yyStateRange A[yyDStateCount + 1];
  186. } yyDefault;
  187. static struct S_5 {
  188.     yyCombType A[yyTableSize + 1];
  189. } yyComb;
  190. static struct S_6 {
  191.     yyStateRange A[yyDStateCount + 1];
  192. } yyEobTrans;
  193. static struct S_7 {
  194.     CHAR A[yyLastCh + 1];
  195. } yyToLower, yyToUpper;
  196. static struct S_8 {
  197.     yyStateRange A[1000000 + 1];
  198. } *yyStateStack;
  199. static LONGINT yyStateStackSize;
  200. static yyStateRange yyStartState;
  201. static yyStateRange yyPreviousStart;
  202. static CHAR yyCh;
  203. static System_tFile yySourceFile;
  204. static BOOLEAN yyEof;
  205. static yytChBufferPtr yyChBufferPtr;
  206. static INTEGER yyChBufferStart;
  207. static LONGINT yyChBufferSize;
  208. static INTEGER yyChBufferIndex;
  209. static INTEGER yyBytesRead;
  210. static CARDINAL yyLineCount;
  211. static INTEGER yyLineStart;
  212. static SHORTCARD yyFileStackPtr;
  213. static struct S_9 {
  214.     struct S_10 {
  215.         System_tFile SourceFile;
  216.         BOOLEAN Eof;
  217.         yytChBufferPtr ChBufferPtr;
  218.         INTEGER ChBufferStart;
  219.         LONGINT ChBufferSize;
  220.         INTEGER ChBufferIndex;
  221.         INTEGER BytesRead;
  222.         CARDINAL LineCount;
  223.         INTEGER LineStart;
  224.     } A[yyFileStackSize - 1 + 1];
  225. } yyFileStack;
  226. struct S_12 {
  227.     CHAR A[255 + 1];
  228. };
  229. static void yyInitialize ARGS(());
  230. static void yyStart ARGS((yyStateRange State));
  231. static void yyPrevious ARGS(());
  232. static void yyEcho ARGS(());
  233. static void yyLess ARGS((INTEGER n));
  234. static void yyTab ARGS(());
  235. static void yyTab1 ARGS((INTEGER a));
  236. static void yyTab2 ARGS((INTEGER a, INTEGER b));
  237. static void yyEol ARGS((INTEGER Column));
  238. static void output ARGS((CHAR c));
  239. static void unput ARGS((CHAR c));
  240. static CHAR input ARGS(());
  241. static void yyGetTables ARGS(());
  242. struct S_13 {
  243.     yyTableRange A[yyDStateCount + 1];
  244. };
  245. static CARDINAL yyGetTable ARGS((System_tFile TableFile, ADDRESS Address));
  246. static void yyErrorMessage ARGS((SHORTCARD ErrorCode));
  247. static void yyExit ARGS(());
  248.  
  249.  
  250. void Scanner_ErrorAttribute
  251. # ifdef __STDC__
  252. (CARDINAL Token, Scanner_tScanAttribute *Attribute)
  253. # else
  254. (Token, Attribute)
  255. CARDINAL Token;
  256. Scanner_tScanAttribute *Attribute;
  257. # endif
  258. {
  259.   {
  260.     register Scanner_tScanAttribute *W_1 = Attribute;
  261.  
  262.     switch (Token) {
  263.     case TokIdentifier:;
  264.       W_1->U_1.V_2.Ident = Idents_NoIdent;
  265.       break;
  266.     case TokInteger:;
  267.       W_1->U_1.V_3.Integer = 0;
  268.       break;
  269.     case TokTargetCode:;
  270.       Texts_MakeText(&W_1->U_1.V_4.Text);
  271.       break;
  272.     case TokString:;
  273.     case TokCode:;
  274.     case TokWhiteSpace:;
  275.       W_1->U_1.V_1.StringRef = Idents_GetStringRef(Idents_NoIdent);
  276.       break;
  277.     default :
  278.       break;
  279.     }
  280.   }
  281. }
  282.  
  283. INTEGER Scanner_GetToken
  284. # ifdef __STDC__
  285. ()
  286. # else
  287. ()
  288. # endif
  289. {
  290.   yyStateRange yyState;
  291.   yyCombTypePtr yyTablePtr;
  292.   BOOLEAN yyRestartFlag;
  293.   INTEGER yyi, yySource, yyTarget, yyChBufferFree;
  294.   Strings_tString String, Word, TargetCode;
  295.   struct S_12 Argument;
  296.   SHORTCARD j;
  297.   CHAR ch;
  298.  
  299.   for (;;) {
  300.     yyState = yyStartState;
  301.     Scanner_TokenLength = 0;
  302.     for (;;) {
  303.       for (;;) {
  304.         yyTablePtr = (yyCombTypePtr)(yyBasePtr.A[yyState] + ORD(yyChBufferPtr->A[yyChBufferIndex]) * sizeof(yyCombType));
  305.         if (yyTablePtr->Check != yyState) {
  306.           yyState = yyDefault.A[yyState];
  307.           if (yyState == yyDNoState) {
  308.             goto EXIT_3;
  309.           }
  310.         } else {
  311.           yyState = yyTablePtr->Next;
  312.           INC(Scanner_TokenLength);
  313.           yyStateStack->A[Scanner_TokenLength] = yyState;
  314.           INC(yyChBufferIndex);
  315.         }
  316.       } EXIT_3:;
  317.       for (;;) {
  318.         switch (yyStateStack->A[Scanner_TokenLength]) {
  319.         case 292:;
  320.           Scanner_Attribute.Position.Line = yyLineCount;
  321.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  322.           if (NestingLevel == 0) {
  323.             Texts_MakeText(&Scanner_Attribute.U_1.V_4.Text);
  324.             Strings_AssignEmpty(&TargetCode);
  325.             Position = Scanner_Attribute.Position;
  326.           } else {
  327.             Scanner_GetWord(&Word);
  328.             Strings_Concatenate(&TargetCode, &Word);
  329.           }
  330.           INC(NestingLevel);
  331.           yyRestartFlag = FALSE;
  332.           goto EXIT_4;
  333.           break;
  334.         case 291:;
  335.           DEC(NestingLevel);
  336.           if (NestingLevel == 0) {
  337.             yyStart(STD);
  338.             Texts_Append(&Scanner_Attribute.U_1.V_4.Text, &TargetCode);
  339.             Scanner_Attribute.Position = Position;
  340.             return TokTargetCode;
  341.           } else {
  342.             Scanner_GetWord(&Word);
  343.             Strings_Concatenate(&TargetCode, &Word);
  344.           }
  345.           yyRestartFlag = FALSE;
  346.           goto EXIT_4;
  347.           break;
  348.         case 24:;
  349.         case 101:;
  350.           if (NestingLevel > 0) {
  351.             Scanner_GetWord(&Word);
  352.             Strings_Concatenate(&TargetCode, &Word);
  353.           }
  354.           yyRestartFlag = FALSE;
  355.           goto EXIT_4;
  356.           break;
  357.         case 290:;
  358.           if (NestingLevel > 0) {
  359.             Strings_Append(&TargetCode, '\t');
  360.           }
  361.           yyTab();
  362.           yyRestartFlag = FALSE;
  363.           goto EXIT_4;
  364.           break;
  365.         case 289:;
  366.           if (NestingLevel > 0) {
  367.             Texts_Append(&Scanner_Attribute.U_1.V_4.Text, &TargetCode);
  368.             Strings_AssignEmpty(&TargetCode);
  369.           }
  370.           yyEol(0L);
  371.           yyRestartFlag = FALSE;
  372.           goto EXIT_4;
  373.           break;
  374.         case 25:;
  375.           if (NestingLevel > 0) {
  376.             Scanner_GetWord(&Word);
  377.             Strings_Append(&TargetCode, Strings_Char(&Word, 2));
  378.           }
  379.           yyRestartFlag = FALSE;
  380.           goto EXIT_4;
  381.           break;
  382.         case 44:;
  383.           if (NestingLevel > 0) {
  384.             Strings_Append(&TargetCode, '\\');
  385.           }
  386.           yyRestartFlag = FALSE;
  387.           goto EXIT_4;
  388.           break;
  389.         case 288:;
  390.           yyStart(comment);
  391.           yyRestartFlag = FALSE;
  392.           goto EXIT_4;
  393.           break;
  394.         case 286:;
  395.           yyPrevious();
  396.           yyRestartFlag = FALSE;
  397.           goto EXIT_4;
  398.           break;
  399.         case 30:;
  400.         case 50:;
  401.         case 96:;
  402.           yyRestartFlag = FALSE;
  403.           goto EXIT_4;
  404.           break;
  405.         case 32:;
  406.           yyRestartFlag = FALSE;
  407.           goto EXIT_4;
  408.           break;
  409.         case 31:;
  410.           Scanner_Attribute.Position.Line = yyLineCount;
  411.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  412.           Scanner_GetWord(&Word);
  413.           Scanner_Attribute.U_1.V_3.Integer = Strings_StringToInt(&Word);
  414.           return TokInteger;
  415.           yyRestartFlag = FALSE;
  416.           goto EXIT_4;
  417.           break;
  418.         case 285:;
  419.           Scanner_Attribute.Position.Line = yyLineCount;
  420.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  421.           Scanner_GetWord(&String);
  422.           if (Sets_IsElement(ORD('c'), &Tree_Options)) {
  423.             yyStart(CStr1);
  424.           } else {
  425.             yyStart(Str1);
  426.           }
  427.           yyRestartFlag = FALSE;
  428.           goto EXIT_4;
  429.           break;
  430.         case 284:;
  431.           Scanner_Attribute.Position.Line = yyLineCount;
  432.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  433.           Scanner_GetWord(&String);
  434.           if (Sets_IsElement(ORD('c'), &Tree_Options)) {
  435.             yyStart(CStr2);
  436.           } else {
  437.             yyStart(Str2);
  438.           }
  439.           yyRestartFlag = FALSE;
  440.           goto EXIT_4;
  441.           break;
  442.         case 29:;
  443.         case 97:;
  444.           Scanner_GetWord(&Word);
  445.           Strings_Concatenate(&String, &Word);
  446.           yyRestartFlag = FALSE;
  447.           goto EXIT_4;
  448.           break;
  449.         case 28:;
  450.         case 98:;
  451.           Scanner_GetWord(&Word);
  452.           Strings_Concatenate(&String, &Word);
  453.           yyRestartFlag = FALSE;
  454.           goto EXIT_4;
  455.           break;
  456.         case 27:;
  457.         case 49:;
  458.         case 71:;
  459.         case 99:;
  460.           Scanner_GetWord(&Word);
  461.           Strings_Concatenate(&String, &Word);
  462.           yyRestartFlag = FALSE;
  463.           goto EXIT_4;
  464.           break;
  465.         case 26:;
  466.         case 48:;
  467.         case 70:;
  468.         case 100:;
  469.           Scanner_GetWord(&Word);
  470.           Strings_Concatenate(&String, &Word);
  471.           yyRestartFlag = FALSE;
  472.           goto EXIT_4;
  473.           break;
  474.         case 283:;
  475.           Scanner_GetWord(&Word);
  476.           Strings_Concatenate(&String, &Word);
  477.           yyEol(0L);
  478.           yyRestartFlag = FALSE;
  479.           goto EXIT_4;
  480.           break;
  481.         case 282:;
  482.           Scanner_GetWord(&Word);
  483.           Strings_Concatenate(&String, &Word);
  484.           yyEol(0L);
  485.           yyRestartFlag = FALSE;
  486.           goto EXIT_4;
  487.           break;
  488.         case 281:;
  489.           Strings_Append(&String, Strings_Char(&String, 1));
  490.           yyPrevious();
  491.           if (yyStartState == targetcode) {
  492.             Strings_Concatenate(&TargetCode, &String);
  493.           } else {
  494.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&String);
  495.             return TokString;
  496.           }
  497.           yyRestartFlag = FALSE;
  498.           goto EXIT_4;
  499.           break;
  500.         case 280:;
  501.           Strings_Append(&String, Strings_Char(&String, 1));
  502.           yyPrevious();
  503.           if (yyStartState == targetcode) {
  504.             Strings_Concatenate(&TargetCode, &String);
  505.           } else {
  506.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&String);
  507.             return TokString;
  508.           }
  509.           yyRestartFlag = FALSE;
  510.           goto EXIT_4;
  511.           break;
  512.         case 279:;
  513.           Strings_Append(&String, '\t');
  514.           yyTab();
  515.           yyRestartFlag = FALSE;
  516.           goto EXIT_4;
  517.           break;
  518.         case 278:;
  519.           Errors_Message((STRING)"unclosed string", 15L, (LONGCARD)Errors_Error, Scanner_Attribute.Position);
  520.           INC(Tree_ErrorCount);
  521.           Strings_Append(&String, Strings_Char(&String, 1));
  522.           yyEol(0L);
  523.           yyPrevious();
  524.           if (yyStartState == targetcode) {
  525.             Strings_Concatenate(&TargetCode, &String);
  526.           } else {
  527.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&String);
  528.             return TokString;
  529.           }
  530.           yyRestartFlag = FALSE;
  531.           goto EXIT_4;
  532.           break;
  533.         case 277:;
  534.           Scanner_Attribute.Position.Line = yyLineCount;
  535.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  536.           return TokLParent;
  537.           yyRestartFlag = FALSE;
  538.           goto EXIT_4;
  539.           break;
  540.         case 276:;
  541.           Scanner_Attribute.Position.Line = yyLineCount;
  542.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  543.           return TokRParent;
  544.           yyRestartFlag = FALSE;
  545.           goto EXIT_4;
  546.           break;
  547.         case 275:;
  548.           Scanner_Attribute.Position.Line = yyLineCount;
  549.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  550.           return TokComma;
  551.           yyRestartFlag = FALSE;
  552.           goto EXIT_4;
  553.           break;
  554.         case 274:;
  555.           Scanner_Attribute.Position.Line = yyLineCount;
  556.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  557.           return TokRArrow;
  558.           yyRestartFlag = FALSE;
  559.           goto EXIT_4;
  560.           break;
  561.         case 272:;
  562.           Scanner_Attribute.Position.Line = yyLineCount;
  563.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  564.           return TokDot;
  565.           yyRestartFlag = FALSE;
  566.           goto EXIT_4;
  567.           break;
  568.         case 241:;
  569.           Scanner_Attribute.Position.Line = yyLineCount;
  570.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  571.           return TokColon;
  572.           yyRestartFlag = FALSE;
  573.           goto EXIT_4;
  574.           break;
  575.         case 270:;
  576.           Scanner_Attribute.Position.Line = yyLineCount;
  577.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  578.           return TokLAngle;
  579.           yyRestartFlag = FALSE;
  580.           goto EXIT_4;
  581.           break;
  582.         case 271:;
  583.           Scanner_Attribute.Position.Line = yyLineCount;
  584.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  585.           return TokLArrow;
  586.           yyRestartFlag = FALSE;
  587.           goto EXIT_4;
  588.           break;
  589.         case 269:;
  590.           Scanner_Attribute.Position.Line = yyLineCount;
  591.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  592.           return TokEqual;
  593.           yyRestartFlag = FALSE;
  594.           goto EXIT_4;
  595.           break;
  596.         case 268:;
  597.           Scanner_Attribute.Position.Line = yyLineCount;
  598.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  599.           return TokRAngle;
  600.           yyRestartFlag = FALSE;
  601.           goto EXIT_4;
  602.           break;
  603.         case 267:;
  604.           Scanner_Attribute.Position.Line = yyLineCount;
  605.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  606.           return TokLBracket;
  607.           yyRestartFlag = FALSE;
  608.           goto EXIT_4;
  609.           break;
  610.         case 266:;
  611.           Scanner_Attribute.Position.Line = yyLineCount;
  612.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  613.           return TokRBracket;
  614.           yyRestartFlag = FALSE;
  615.           goto EXIT_4;
  616.           break;
  617.         case 265:;
  618.           Scanner_Attribute.Position.Line = yyLineCount;
  619.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  620.           yyStart(expr);
  621.           INC(NestingLevel);
  622.           return TokLBrace;
  623.           yyRestartFlag = FALSE;
  624.           goto EXIT_4;
  625.           break;
  626.         case 264:;
  627.           Scanner_Attribute.Position.Line = yyLineCount;
  628.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  629.           return TokAfter;
  630.           yyRestartFlag = FALSE;
  631.           goto EXIT_4;
  632.           break;
  633.         case 259:;
  634.           Scanner_Attribute.Position.Line = yyLineCount;
  635.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  636.           return TokBefore;
  637.           yyRestartFlag = FALSE;
  638.           goto EXIT_4;
  639.           break;
  640.         case 253:;
  641.           Scanner_Attribute.Position.Line = yyLineCount;
  642.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  643.           return TokCheck;
  644.           yyRestartFlag = FALSE;
  645.           goto EXIT_4;
  646.           break;
  647.         case 248:;
  648.           Scanner_Attribute.Position.Line = yyLineCount;
  649.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  650.           return TokRemote;
  651.           yyRestartFlag = FALSE;
  652.           goto EXIT_4;
  653.           break;
  654.         case 18:;
  655.         case 43:;
  656.           Scanner_Attribute.Position.Line = yyLineCount;
  657.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  658.           Scanner_GetWord(&Word);
  659.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  660.           return TokCode;
  661.           yyRestartFlag = FALSE;
  662.           goto EXIT_4;
  663.           break;
  664.         case 242:;
  665.           Scanner_Attribute.Position.Line = yyLineCount;
  666.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  667.           if (NestingLevel <= 1) {
  668.             return TokAssign;
  669.           } else {
  670.             Scanner_GetWord(&Word);
  671.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  672.             return TokCode;
  673.           }
  674.           yyRestartFlag = FALSE;
  675.           goto EXIT_4;
  676.           break;
  677.         case 240:;
  678.           Scanner_Attribute.Position.Line = yyLineCount;
  679.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  680.           if (NestingLevel <= 1) {
  681.             return TokCopy;
  682.           } else {
  683.             Scanner_GetWord(&Word);
  684.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  685.             return TokCode;
  686.           }
  687.           yyRestartFlag = FALSE;
  688.           goto EXIT_4;
  689.           break;
  690.         case 239:;
  691.           Scanner_Attribute.Position.Line = yyLineCount;
  692.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  693.           if (NestingLevel <= 1) {
  694.             return TokSemiColon;
  695.           } else {
  696.             Scanner_GetWord(&Word);
  697.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  698.             return TokCode;
  699.           }
  700.           yyRestartFlag = FALSE;
  701.           goto EXIT_4;
  702.           break;
  703.         case 238:;
  704.           Scanner_Attribute.Position.Line = yyLineCount;
  705.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  706.           Scanner_GetWord(&Word);
  707.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  708.           return TokColon;
  709.           yyRestartFlag = FALSE;
  710.           goto EXIT_4;
  711.           break;
  712.         case 23:;
  713.           Scanner_Attribute.Position.Line = yyLineCount;
  714.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  715.           return TokArrow;
  716.           yyRestartFlag = FALSE;
  717.           goto EXIT_4;
  718.           break;
  719.         case 237:;
  720.           Scanner_Attribute.Position.Line = yyLineCount;
  721.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  722.           INC(NestingLevel);
  723.           if (NestingLevel <= 2) {
  724.             return TokLBrace;
  725.           } else {
  726.             Scanner_GetWord(&Word);
  727.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  728.             return TokCode;
  729.           }
  730.           yyRestartFlag = FALSE;
  731.           goto EXIT_4;
  732.           break;
  733.         case 236:;
  734.           Scanner_Attribute.Position.Line = yyLineCount;
  735.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  736.           DEC(NestingLevel);
  737.           if (NestingLevel == 0) {
  738.             yyStart(STD);
  739.           }
  740.           if (NestingLevel <= 1) {
  741.             return TokRBrace;
  742.           } else {
  743.             Scanner_GetWord(&Word);
  744.             Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  745.             return TokCode;
  746.           }
  747.           yyRestartFlag = FALSE;
  748.           goto EXIT_4;
  749.           break;
  750.         case 235:;
  751.           Scanner_Attribute.Position.Line = yyLineCount;
  752.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  753.           Scanner_GetWord(&Word);
  754.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  755.           return TokCode;
  756.           yyRestartFlag = FALSE;
  757.           goto EXIT_4;
  758.           break;
  759.         case 45:;
  760.           Scanner_Attribute.Position.Line = yyLineCount;
  761.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  762.           Scanner_GetWord(&Word);
  763.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  764.           return TokCode;
  765.           yyRestartFlag = FALSE;
  766.           goto EXIT_4;
  767.           break;
  768.         case 19:;
  769.         case 102:;
  770.           Scanner_Attribute.Position.Line = yyLineCount;
  771.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  772.           Scanner_GetWord(&Word);
  773.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  774.           return TokWhiteSpace;
  775.           yyRestartFlag = FALSE;
  776.           goto EXIT_4;
  777.           break;
  778.         case 234:;
  779.           Scanner_Attribute.Position.Line = yyLineCount;
  780.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  781.           Scanner_GetWord(&Word);
  782.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  783.           yyEol(0L);
  784.           return TokWhiteSpace;
  785.           yyRestartFlag = FALSE;
  786.           goto EXIT_4;
  787.           break;
  788.         case 233:;
  789.           Scanner_Attribute.Position.Line = yyLineCount;
  790.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  791.           Scanner_GetWord(&Word);
  792.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  793.           yyTab();
  794.           return TokWhiteSpace;
  795.           yyRestartFlag = FALSE;
  796.           goto EXIT_4;
  797.           break;
  798.         case 21:;
  799.         case 47:;
  800.           Scanner_Attribute.Position.Line = yyLineCount;
  801.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  802.           Scanner_GetWord(&Word);
  803.           Strings_SubString(&Word, 2, 2, &String);
  804.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&String);
  805.           return TokCode;
  806.           yyRestartFlag = FALSE;
  807.           goto EXIT_4;
  808.           break;
  809.         case 22:;
  810.           Scanner_Attribute.Position.Line = yyLineCount;
  811.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  812.           Scanner_GetWord(&Word);
  813.           Strings_SubString(&Word, 2, (Strings_tStringIndex)Strings_Length(&Word), &String);
  814.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&String);
  815.           return TokCode;
  816.           yyRestartFlag = FALSE;
  817.           goto EXIT_4;
  818.           break;
  819.         case 46:;
  820.           Scanner_Attribute.Position.Line = yyLineCount;
  821.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  822.           Scanner_GetWord(&Word);
  823.           Scanner_Attribute.U_1.V_1.StringRef = StringMem_PutString(&Word);
  824.           return TokCode;
  825.           yyRestartFlag = FALSE;
  826.           goto EXIT_4;
  827.           break;
  828.         case 232:;
  829.           Scanner_Attribute.Position.Line = yyLineCount;
  830.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  831.           yyStart(targetcode);
  832.           return TokBegin;
  833.           yyRestartFlag = FALSE;
  834.           goto EXIT_4;
  835.           break;
  836.         case 227:;
  837.           Scanner_Attribute.Position.Line = yyLineCount;
  838.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  839.           yyStart(targetcode);
  840.           return TokClose;
  841.           yyRestartFlag = FALSE;
  842.           goto EXIT_4;
  843.           break;
  844.         case 222:;
  845.           Scanner_Attribute.Position.Line = yyLineCount;
  846.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  847.           return TokDeclare;
  848.           yyRestartFlag = FALSE;
  849.           goto EXIT_4;
  850.           break;
  851.         case 217:;
  852.           Scanner_Attribute.Position.Line = yyLineCount;
  853.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  854.           return TokDemand;
  855.           yyRestartFlag = FALSE;
  856.           goto EXIT_4;
  857.           break;
  858.         case 211:;
  859.           Scanner_Attribute.Position.Line = yyLineCount;
  860.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  861.           return TokEnd;
  862.           yyRestartFlag = FALSE;
  863.           goto EXIT_4;
  864.           break;
  865.         case 209:;
  866.           Scanner_Attribute.Position.Line = yyLineCount;
  867.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  868.           return TokEval;
  869.           yyRestartFlag = FALSE;
  870.           goto EXIT_4;
  871.           break;
  872.         case 206:;
  873.           Scanner_Attribute.Position.Line = yyLineCount;
  874.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  875.           yyStart(targetcode);
  876.           return TokExport;
  877.           yyRestartFlag = FALSE;
  878.           goto EXIT_4;
  879.           break;
  880.         case 200:;
  881.           Scanner_Attribute.Position.Line = yyLineCount;
  882.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  883.           return TokFor;
  884.           yyRestartFlag = FALSE;
  885.           goto EXIT_4;
  886.           break;
  887.         case 198:;
  888.           Scanner_Attribute.Position.Line = yyLineCount;
  889.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  890.           return TokFunction;
  891.           yyRestartFlag = FALSE;
  892.           goto EXIT_4;
  893.           break;
  894.         case 190:;
  895.           Scanner_Attribute.Position.Line = yyLineCount;
  896.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  897.           yyStart(targetcode);
  898.           return TokGlobal;
  899.           yyRestartFlag = FALSE;
  900.           goto EXIT_4;
  901.           break;
  902.         case 184:;
  903.           Scanner_Attribute.Position.Line = yyLineCount;
  904.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  905.           return TokIgnore;
  906.           yyRestartFlag = FALSE;
  907.           goto EXIT_4;
  908.           break;
  909.         case 179:;
  910.           Scanner_Attribute.Position.Line = yyLineCount;
  911.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  912.           yyStart(targetcode);
  913.           return TokImport;
  914.           yyRestartFlag = FALSE;
  915.           goto EXIT_4;
  916.           break;
  917.         case 38:;
  918.         case 51:;
  919.           Scanner_Attribute.Position.Line = yyLineCount;
  920.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  921.           return TokInput;
  922.           yyRestartFlag = FALSE;
  923.           goto EXIT_4;
  924.           break;
  925.         case 39:;
  926.         case 87:;
  927.           Scanner_Attribute.Position.Line = yyLineCount;
  928.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  929.           return TokInherited;
  930.           yyRestartFlag = FALSE;
  931.           goto EXIT_4;
  932.           break;
  933.         case 174:;
  934.           Scanner_Attribute.Position.Line = yyLineCount;
  935.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  936.           return TokLeft;
  937.           yyRestartFlag = FALSE;
  938.           goto EXIT_4;
  939.           break;
  940.         case 171:;
  941.           Scanner_Attribute.Position.Line = yyLineCount;
  942.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  943.           yyStart(targetcode);
  944.           return TokLocal;
  945.           yyRestartFlag = FALSE;
  946.           goto EXIT_4;
  947.           break;
  948.         case 166:;
  949.           Scanner_Attribute.Position.Line = yyLineCount;
  950.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  951.           return TokModule;
  952.           yyRestartFlag = FALSE;
  953.           goto EXIT_4;
  954.           break;
  955.         case 160:;
  956.           Scanner_Attribute.Position.Line = yyLineCount;
  957.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  958.           return TokNone;
  959.           yyRestartFlag = FALSE;
  960.           goto EXIT_4;
  961.           break;
  962.         case 37:;
  963.         case 72:;
  964.           Scanner_Attribute.Position.Line = yyLineCount;
  965.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  966.           return TokOutput;
  967.           yyRestartFlag = FALSE;
  968.           goto EXIT_4;
  969.           break;
  970.         case 156:;
  971.           Scanner_Attribute.Position.Line = yyLineCount;
  972.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  973.           return TokParser;
  974.           yyRestartFlag = FALSE;
  975.           goto EXIT_4;
  976.           break;
  977.         case 151:;
  978.           Scanner_Attribute.Position.Line = yyLineCount;
  979.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  980.           return TokPrec;
  981.           yyRestartFlag = FALSE;
  982.           goto EXIT_4;
  983.           break;
  984.         case 149:;
  985.           Scanner_Attribute.Position.Line = yyLineCount;
  986.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  987.           return TokProperty;
  988.           yyRestartFlag = FALSE;
  989.           goto EXIT_4;
  990.           break;
  991.         case 36:;
  992.         case 86:;
  993.           Scanner_Attribute.Position.Line = yyLineCount;
  994.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  995.           return TokReverse;
  996.           yyRestartFlag = FALSE;
  997.           goto EXIT_4;
  998.           break;
  999.         case 141:;
  1000.           Scanner_Attribute.Position.Line = yyLineCount;
  1001.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1002.           return TokRight;
  1003.           yyRestartFlag = FALSE;
  1004.           goto EXIT_4;
  1005.           break;
  1006.         case 137:;
  1007.           Scanner_Attribute.Position.Line = yyLineCount;
  1008.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1009.           return TokRule;
  1010.           yyRestartFlag = FALSE;
  1011.           goto EXIT_4;
  1012.           break;
  1013.         case 134:;
  1014.           Scanner_Attribute.Position.Line = yyLineCount;
  1015.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1016.           return TokScanner;
  1017.           yyRestartFlag = FALSE;
  1018.           goto EXIT_4;
  1019.           break;
  1020.         case 128:;
  1021.           Scanner_Attribute.Position.Line = yyLineCount;
  1022.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1023.           return TokSelect;
  1024.           yyRestartFlag = FALSE;
  1025.           goto EXIT_4;
  1026.           break;
  1027.         case 123:;
  1028.           Scanner_Attribute.Position.Line = yyLineCount;
  1029.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1030.           return TokStack;
  1031.           yyRestartFlag = FALSE;
  1032.           goto EXIT_4;
  1033.           break;
  1034.         case 119:;
  1035.           Scanner_Attribute.Position.Line = yyLineCount;
  1036.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1037.           return TokSubunit;
  1038.           yyRestartFlag = FALSE;
  1039.           goto EXIT_4;
  1040.           break;
  1041.         case 35:;
  1042.         case 85:;
  1043.           Scanner_Attribute.Position.Line = yyLineCount;
  1044.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1045.           return TokSynthesized;
  1046.           yyRestartFlag = FALSE;
  1047.           goto EXIT_4;
  1048.           break;
  1049.         case 113:;
  1050.           Scanner_Attribute.Position.Line = yyLineCount;
  1051.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1052.           return TokThread;
  1053.           yyRestartFlag = FALSE;
  1054.           goto EXIT_4;
  1055.           break;
  1056.         case 108:;
  1057.           Scanner_Attribute.Position.Line = yyLineCount;
  1058.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1059.           return TokTree;
  1060.           yyRestartFlag = FALSE;
  1061.           goto EXIT_4;
  1062.           break;
  1063.         case 104:;
  1064.           Scanner_Attribute.Position.Line = yyLineCount;
  1065.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1066.           return TokView;
  1067.           yyRestartFlag = FALSE;
  1068.           goto EXIT_4;
  1069.           break;
  1070.         case 34:;
  1071.           Scanner_Attribute.Position.Line = yyLineCount;
  1072.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1073.           return TokVirtual;
  1074.           yyRestartFlag = FALSE;
  1075.           goto EXIT_4;
  1076.           break;
  1077.         case 17:;
  1078.         case 40:;
  1079.         case 41:;
  1080.         case 42:;
  1081.         case 52:;
  1082.         case 53:;
  1083.         case 54:;
  1084.         case 55:;
  1085.         case 56:;
  1086.         case 57:;
  1087.         case 58:;
  1088.         case 59:;
  1089.         case 60:;
  1090.         case 61:;
  1091.         case 62:;
  1092.         case 63:;
  1093.         case 64:;
  1094.         case 65:;
  1095.         case 66:;
  1096.         case 67:;
  1097.         case 68:;
  1098.         case 73:;
  1099.         case 74:;
  1100.         case 75:;
  1101.         case 76:;
  1102.         case 77:;
  1103.         case 78:;
  1104.         case 79:;
  1105.         case 80:;
  1106.         case 81:;
  1107.         case 82:;
  1108.         case 83:;
  1109.         case 84:;
  1110.         case 88:;
  1111.         case 89:;
  1112.         case 103:;
  1113.         case 105:;
  1114.         case 106:;
  1115.         case 107:;
  1116.         case 109:;
  1117.         case 110:;
  1118.         case 111:;
  1119.         case 112:;
  1120.         case 114:;
  1121.         case 115:;
  1122.         case 116:;
  1123.         case 117:;
  1124.         case 118:;
  1125.         case 120:;
  1126.         case 121:;
  1127.         case 122:;
  1128.         case 124:;
  1129.         case 125:;
  1130.         case 126:;
  1131.         case 127:;
  1132.         case 129:;
  1133.         case 130:;
  1134.         case 131:;
  1135.         case 132:;
  1136.         case 133:;
  1137.         case 135:;
  1138.         case 136:;
  1139.         case 138:;
  1140.         case 139:;
  1141.         case 140:;
  1142.         case 142:;
  1143.         case 143:;
  1144.         case 144:;
  1145.         case 145:;
  1146.         case 146:;
  1147.         case 147:;
  1148.         case 148:;
  1149.         case 150:;
  1150.         case 152:;
  1151.         case 153:;
  1152.         case 154:;
  1153.         case 155:;
  1154.         case 157:;
  1155.         case 158:;
  1156.         case 159:;
  1157.         case 161:;
  1158.         case 162:;
  1159.         case 163:;
  1160.         case 164:;
  1161.         case 165:;
  1162.         case 167:;
  1163.         case 168:;
  1164.         case 169:;
  1165.         case 170:;
  1166.         case 172:;
  1167.         case 173:;
  1168.         case 175:;
  1169.         case 176:;
  1170.         case 177:;
  1171.         case 178:;
  1172.         case 180:;
  1173.         case 181:;
  1174.         case 182:;
  1175.         case 183:;
  1176.         case 185:;
  1177.         case 186:;
  1178.         case 187:;
  1179.         case 188:;
  1180.         case 189:;
  1181.         case 191:;
  1182.         case 192:;
  1183.         case 193:;
  1184.         case 194:;
  1185.         case 195:;
  1186.         case 196:;
  1187.         case 197:;
  1188.         case 199:;
  1189.         case 201:;
  1190.         case 202:;
  1191.         case 203:;
  1192.         case 204:;
  1193.         case 205:;
  1194.         case 207:;
  1195.         case 208:;
  1196.         case 210:;
  1197.         case 212:;
  1198.         case 213:;
  1199.         case 214:;
  1200.         case 215:;
  1201.         case 216:;
  1202.         case 218:;
  1203.         case 219:;
  1204.         case 220:;
  1205.         case 221:;
  1206.         case 223:;
  1207.         case 224:;
  1208.         case 225:;
  1209.         case 226:;
  1210.         case 228:;
  1211.         case 229:;
  1212.         case 230:;
  1213.         case 231:;
  1214.         case 243:;
  1215.         case 244:;
  1216.         case 245:;
  1217.         case 246:;
  1218.         case 247:;
  1219.         case 249:;
  1220.         case 250:;
  1221.         case 251:;
  1222.         case 252:;
  1223.         case 254:;
  1224.         case 255:;
  1225.         case 256:;
  1226.         case 257:;
  1227.         case 258:;
  1228.         case 260:;
  1229.         case 261:;
  1230.         case 262:;
  1231.         case 263:;
  1232.           Scanner_Attribute.Position.Line = yyLineCount;
  1233.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1234.           Scanner_GetWord(&Word);
  1235.           Scanner_Attribute.U_1.V_2.Ident = Idents_MakeIdent(&Word);
  1236.           return TokIdentifier;
  1237.           yyRestartFlag = FALSE;
  1238.           goto EXIT_4;
  1239.           break;
  1240.         case 33:;
  1241.           Scanner_Attribute.Position.Line = yyLineCount;
  1242.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart - Scanner_TokenLength;
  1243.           Scanner_GetWord(&Word);
  1244.           Strings_SubString(&Word, 2, (Strings_tStringIndex)Strings_Length(&Word), &String);
  1245.           Scanner_Attribute.U_1.V_2.Ident = Idents_MakeIdent(&String);
  1246.           return TokIdentifier;
  1247.           yyRestartFlag = FALSE;
  1248.           goto EXIT_4;
  1249.           break;
  1250.         case 95:;
  1251.           while (yyChBufferPtr->A[yyChBufferIndex] == ' ') {
  1252.             INC(yyChBufferIndex);
  1253.           }
  1254.           yyRestartFlag = FALSE;
  1255.           goto EXIT_4;
  1256.           break;
  1257.         case 94:;
  1258.           DEC1(yyLineStart, 7 - (yyChBufferIndex - yyLineStart - 2) % 8);
  1259.           yyRestartFlag = FALSE;
  1260.           goto EXIT_4;
  1261.           break;
  1262.         case 93:;
  1263.           INC(yyLineCount);
  1264.           yyLineStart = yyChBufferIndex - 1;
  1265.           yyRestartFlag = FALSE;
  1266.           goto EXIT_4;
  1267.           break;
  1268.         case 1:;
  1269.         case 2:;
  1270.         case 3:;
  1271.         case 4:;
  1272.         case 5:;
  1273.         case 6:;
  1274.         case 7:;
  1275.         case 8:;
  1276.         case 9:;
  1277.         case 10:;
  1278.         case 11:;
  1279.         case 12:;
  1280.         case 13:;
  1281.         case 14:;
  1282.         case 15:;
  1283.         case 16:;
  1284.         case 20:;
  1285.         case 69:;
  1286.         case 90:;
  1287.         case 273:;
  1288.         case 287:;
  1289.           DEC(yyChBufferIndex);
  1290.           DEC(Scanner_TokenLength);
  1291.           break;
  1292.         case 92:;
  1293.           Scanner_Attribute.Position.Line = yyLineCount;
  1294.           Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart;
  1295.           INC(yyChBufferIndex);
  1296.           Scanner_TokenLength = 1;
  1297.           Scanner_GetWord(&Word);
  1298.           Errors_MessageI((STRING)"illegal character", 17L, (LONGCARD)Errors_Error, Scanner_Attribute.Position, (LONGCARD)Errors_String, ADR(Word));
  1299.           INC(Tree_ErrorCount);
  1300.           yyRestartFlag = FALSE;
  1301.           goto EXIT_4;
  1302.           break;
  1303.         case yyDNoState:;
  1304.           yyGetTables();
  1305.           yyStateStack->A[0] = yyDefaultState;
  1306.           if (yyFileStackPtr == 0) {
  1307.             yyInitialize();
  1308.             yySourceFile = System_StdInput;
  1309.           }
  1310.           yyRestartFlag = FALSE;
  1311.           goto EXIT_4;
  1312.           break;
  1313.         case 91:;
  1314.           DEC(yyChBufferIndex);
  1315.           DEC(Scanner_TokenLength);
  1316.           if (Scanner_TokenLength == 0) {
  1317.             yyState = yyStartState;
  1318.           } else {
  1319.             yyState = yyStateStack->A[Scanner_TokenLength];
  1320.           }
  1321.           if (yyChBufferIndex != yyChBufferStart + yyBytesRead) {
  1322.             yyState = yyEobTrans.A[yyState];
  1323.             if (yyState != yyDNoState) {
  1324.               INC(yyChBufferIndex);
  1325.               INC(Scanner_TokenLength);
  1326.               yyStateStack->A[Scanner_TokenLength] = yyState;
  1327.               yyRestartFlag = TRUE;
  1328.               goto EXIT_4;
  1329.             }
  1330.           } else {
  1331.             yySource = yyChBufferIndex - Scanner_TokenLength - 1;
  1332.             yyTarget = General_MaxAlign - Scanner_TokenLength % General_MaxAlign - 1;
  1333.             if (yySource != yyTarget) {
  1334.               {
  1335.                 LONGINT B_1 = 1, B_2 = Scanner_TokenLength;
  1336.  
  1337.                 if (B_1 <= B_2)
  1338.                   for (yyi = B_1;; yyi += 1) {
  1339.                     yyChBufferPtr->A[yyTarget + yyi] = yyChBufferPtr->A[yySource + yyi];
  1340.                     if (yyi >= B_2) break;
  1341.                   }
  1342.               }
  1343.               DEC1(yyLineStart, yySource - yyTarget);
  1344.               yyChBufferStart = yyTarget + Scanner_TokenLength + 1;
  1345.             } else {
  1346.               yyChBufferStart = yyChBufferIndex;
  1347.             }
  1348.             if (!yyEof) {
  1349.               yyChBufferFree = General_Exp2(General_Log2(yyChBufferSize - 4 - General_MaxAlign - Scanner_TokenLength));
  1350.               if (yyChBufferFree < yyChBufferSize / 8) {
  1351.                 DynArray_ExtendArray((ADDRESS *)&yyChBufferPtr, &yyChBufferSize, (LONGINT)sizeof(CHAR));
  1352.                 if (yyChBufferPtr == NIL) {
  1353.                   yyErrorMessage(1);
  1354.                 }
  1355.                 yyChBufferFree = General_Exp2(General_Log2(yyChBufferSize - 4 - General_MaxAlign - Scanner_TokenLength));
  1356.                 if (yyStateStackSize < yyChBufferSize) {
  1357.                   DynArray_ExtendArray((ADDRESS *)&yyStateStack, &yyStateStackSize, (LONGINT)sizeof(yyStateRange));
  1358.                   if (yyStateStack == NIL) {
  1359.                     yyErrorMessage(1);
  1360.                   }
  1361.                 }
  1362.               }
  1363.               yyChBufferIndex = yyChBufferStart;
  1364.               yyBytesRead = Source_GetLine(yySourceFile, ADR(yyChBufferPtr->A[yyChBufferIndex]), (LONGCARD)yyChBufferFree);
  1365.               if (yyBytesRead <= 0) {
  1366.                 yyBytesRead = 0;
  1367.                 yyEof = TRUE;
  1368.               }
  1369.               yyChBufferPtr->A[yyChBufferStart + yyBytesRead] = yyEobCh;
  1370.               yyChBufferPtr->A[yyChBufferStart + yyBytesRead + 1] = '\0';
  1371.               yyRestartFlag = TRUE;
  1372.               goto EXIT_4;
  1373.             }
  1374.             if (Scanner_TokenLength == 0) {
  1375.               Scanner_Attribute.Position.Line = yyLineCount;
  1376.               Scanner_Attribute.Position.Column = yyChBufferIndex - yyLineStart;
  1377.               Scanner_CloseFile();
  1378.               if (yyFileStackPtr == 0) {
  1379.                 switch (yyStartState) {
  1380.                 case targetcode:;
  1381.                 case expr:;
  1382.                   Errors_Message((STRING)"unclosed target code", 20L, (LONGCARD)Errors_Error, Scanner_Attribute.Position);
  1383.                   INC(Tree_ErrorCount);
  1384.                   break;
  1385.                 case comment:;
  1386.                   Errors_Message((STRING)"unclosed comment", 16L, (LONGCARD)Errors_Error, Scanner_Attribute.Position);
  1387.                   INC(Tree_ErrorCount);
  1388.                   break;
  1389.                 case CStr1:;
  1390.                 case CStr2:;
  1391.                 case Str1:;
  1392.                 case Str2:;
  1393.                   Errors_Message((STRING)"unclosed string", 15L, (LONGCARD)Errors_Error, Scanner_Attribute.Position);
  1394.                   INC(Tree_ErrorCount);
  1395.                   break;
  1396.                 default :
  1397.                   break;
  1398.                 }
  1399.                 yyStart(STD);
  1400.                 INC(Scanner_CurArg);
  1401.                 if (Scanner_CurArg <= Scanner_ArgCount) {
  1402.                   GetArgument(Scanner_CurArg, Argument.A, 256L);
  1403.                   j = 0;
  1404.                   do {
  1405.                     ch = Argument.A[j];
  1406.                     Tree_SourceFile.A[j] = ch;
  1407.                     INC(j);
  1408.                   } while (!(ch == '\0'));
  1409.                   Scanner_BeginFile(Tree_SourceFile.A, 256L);
  1410.                   Strings_ArrayToString(Tree_SourceFile.A, 256L, &String);
  1411.                   Scanner_Attribute.Position.File = Idents_MakeIdent(&String);
  1412.                 }
  1413.               }
  1414.               if (yyFileStackPtr == 0) {
  1415.                 return Scanner_EofToken;
  1416.               }
  1417.               yyRestartFlag = FALSE;
  1418.               goto EXIT_4;
  1419.             }
  1420.           }
  1421.           break;
  1422.         default :
  1423.           yyErrorMessage(0);
  1424.           break;
  1425.         }
  1426.       } EXIT_4:;
  1427.       if (yyRestartFlag) {
  1428.       } else {
  1429.         goto EXIT_2;
  1430.       }
  1431.     } EXIT_2:;
  1432.   } EXIT_1:;
  1433. }
  1434.  
  1435. void Scanner_BeginFile
  1436. # ifdef __STDC__
  1437. (CHAR FileName[], LONGCARD O_1)
  1438. # else
  1439. (FileName, O_1)
  1440. CHAR FileName[];
  1441. LONGCARD O_1;
  1442. # endif
  1443. {
  1444.   OPEN_ARRAY_LOCALS
  1445.  
  1446.   ALLOC_OPEN_ARRAYS(O_1 * sizeof(CHAR), 1)
  1447.   COPY_OPEN_ARRAY(FileName, O_1, CHAR)
  1448.   if (yyStateStack->A[0] == yyDNoState) {
  1449.     yyGetTables();
  1450.     yyStateStack->A[0] = yyDefaultState;
  1451.   }
  1452.   yyInitialize();
  1453.   yySourceFile = Source_BeginSource(FileName, O_1);
  1454.   FREE_OPEN_ARRAYS
  1455. }
  1456.  
  1457. static void yyInitialize
  1458. # ifdef __STDC__
  1459. ()
  1460. # else
  1461. ()
  1462. # endif
  1463. {
  1464.   if (yyFileStackPtr >= yyFileStackSize) {
  1465.     yyErrorMessage(3);
  1466.   }
  1467.   INC(yyFileStackPtr);
  1468.   {
  1469.     register struct S_10 *W_2 = &yyFileStack.A[yyFileStackPtr - 1];
  1470.  
  1471.     W_2->SourceFile = yySourceFile;
  1472.     W_2->Eof = yyEof;
  1473.     W_2->ChBufferPtr = yyChBufferPtr;
  1474.     W_2->ChBufferStart = yyChBufferStart;
  1475.     W_2->ChBufferSize = yyChBufferSize;
  1476.     W_2->ChBufferIndex = yyChBufferIndex;
  1477.     W_2->BytesRead = yyBytesRead;
  1478.     W_2->LineCount = yyLineCount;
  1479.     W_2->LineStart = yyLineStart;
  1480.   }
  1481.   yyChBufferSize = yyInitBufferSize;
  1482.   DynArray_MakeArray((ADDRESS *)&yyChBufferPtr, &yyChBufferSize, (LONGINT)sizeof(CHAR));
  1483.   yyChBufferStart = General_MaxAlign;
  1484.   yyChBufferPtr->A[yyChBufferStart - 1] = yyEolCh;
  1485.   yyChBufferPtr->A[yyChBufferStart] = yyEobCh;
  1486.   yyChBufferPtr->A[yyChBufferStart + 1] = '\0';
  1487.   yyChBufferIndex = yyChBufferStart;
  1488.   yyEof = FALSE;
  1489.   yyBytesRead = 0;
  1490.   yyLineCount = 1;
  1491.   yyLineStart = yyChBufferStart - 1;
  1492. }
  1493.  
  1494. void Scanner_CloseFile
  1495. # ifdef __STDC__
  1496. ()
  1497. # else
  1498. ()
  1499. # endif
  1500. {
  1501.   if (yyFileStackPtr == 0) {
  1502.     yyErrorMessage(4);
  1503.   }
  1504.   Source_CloseSource(yySourceFile);
  1505.   DynArray_ReleaseArray((ADDRESS *)&yyChBufferPtr, &yyChBufferSize, (LONGINT)sizeof(CHAR));
  1506.   {
  1507.     register struct S_10 *W_3 = &yyFileStack.A[yyFileStackPtr - 1];
  1508.  
  1509.     yySourceFile = W_3->SourceFile;
  1510.     yyEof = W_3->Eof;
  1511.     yyChBufferPtr = W_3->ChBufferPtr;
  1512.     yyChBufferStart = W_3->ChBufferStart;
  1513.     yyChBufferSize = W_3->ChBufferSize;
  1514.     yyChBufferIndex = W_3->ChBufferIndex;
  1515.     yyBytesRead = W_3->BytesRead;
  1516.     yyLineCount = W_3->LineCount;
  1517.     yyLineStart = W_3->LineStart;
  1518.   }
  1519.   DEC(yyFileStackPtr);
  1520. }
  1521.  
  1522. void Scanner_GetWord
  1523. # ifdef __STDC__
  1524. (Strings_tString *Word)
  1525. # else
  1526. (Word)
  1527. Strings_tString *Word;
  1528. # endif
  1529. {
  1530.   INTEGER i, WordStart;
  1531.  
  1532.   WordStart = yyChBufferIndex - Scanner_TokenLength - 1;
  1533.   {
  1534.     LONGINT B_3 = 1, B_4 = Scanner_TokenLength;
  1535.  
  1536.     if (B_3 <= B_4)
  1537.       for (i = B_3;; i += 1) {
  1538.         Word->Chars.A[i] = yyChBufferPtr->A[WordStart + i];
  1539.         if (i >= B_4) break;
  1540.       }
  1541.   }
  1542.   Word->Length = Scanner_TokenLength;
  1543. }
  1544.  
  1545. void Scanner_GetLower
  1546. # ifdef __STDC__
  1547. (Strings_tString *Word)
  1548. # else
  1549. (Word)
  1550. Strings_tString *Word;
  1551. # endif
  1552. {
  1553.   INTEGER i, WordStart;
  1554.  
  1555.   WordStart = yyChBufferIndex - Scanner_TokenLength - 1;
  1556.   {
  1557.     LONGINT B_5 = 1, B_6 = Scanner_TokenLength;
  1558.  
  1559.     if (B_5 <= B_6)
  1560.       for (i = B_5;; i += 1) {
  1561.         Word->Chars.A[i] = yyToLower.A[yyChBufferPtr->A[WordStart + i]];
  1562.         if (i >= B_6) break;
  1563.       }
  1564.   }
  1565.   Word->Length = Scanner_TokenLength;
  1566. }
  1567.  
  1568. void Scanner_GetUpper
  1569. # ifdef __STDC__
  1570. (Strings_tString *Word)
  1571. # else
  1572. (Word)
  1573. Strings_tString *Word;
  1574. # endif
  1575. {
  1576.   INTEGER i, WordStart;
  1577.  
  1578.   WordStart = yyChBufferIndex - Scanner_TokenLength - 1;
  1579.   {
  1580.     LONGINT B_7 = 1, B_8 = Scanner_TokenLength;
  1581.  
  1582.     if (B_7 <= B_8)
  1583.       for (i = B_7;; i += 1) {
  1584.         Word->Chars.A[i] = yyToUpper.A[yyChBufferPtr->A[WordStart + i]];
  1585.         if (i >= B_8) break;
  1586.       }
  1587.   }
  1588.   Word->Length = Scanner_TokenLength;
  1589. }
  1590.  
  1591. static void yyStart
  1592. # ifdef __STDC__
  1593. (yyStateRange State)
  1594. # else
  1595. (State)
  1596. yyStateRange State;
  1597. # endif
  1598. {
  1599.   yyPreviousStart = yyStartState;
  1600.   yyStartState = State;
  1601. }
  1602.  
  1603. static void yyPrevious
  1604. # ifdef __STDC__
  1605. ()
  1606. # else
  1607. ()
  1608. # endif
  1609. {
  1610.   yyStateRange s;
  1611.  
  1612.   s = yyStartState;
  1613.   yyStartState = yyPreviousStart;
  1614.   yyPreviousStart = s;
  1615. }
  1616.  
  1617. static void yyEcho
  1618. # ifdef __STDC__
  1619. ()
  1620. # else
  1621. ()
  1622. # endif
  1623. {
  1624.   INTEGER i;
  1625.  
  1626.   {
  1627.     LONGINT B_9 = yyChBufferIndex - Scanner_TokenLength, B_10 = yyChBufferIndex - 1;
  1628.  
  1629.     if (B_9 <= B_10)
  1630.       for (i = B_9;; i += 1) {
  1631.         IO_WriteC((System_tFile)IO_StdOutput, yyChBufferPtr->A[i]);
  1632.         if (i >= B_10) break;
  1633.       }
  1634.   }
  1635. }
  1636.  
  1637. static void yyLess
  1638. # ifdef __STDC__
  1639. (INTEGER n)
  1640. # else
  1641. (n)
  1642. INTEGER n;
  1643. # endif
  1644. {
  1645.   DEC1(yyChBufferIndex, Scanner_TokenLength - n);
  1646.   Scanner_TokenLength = n;
  1647. }
  1648.  
  1649. static void yyTab
  1650. # ifdef __STDC__
  1651. ()
  1652. # else
  1653. ()
  1654. # endif
  1655. {
  1656.   DEC1(yyLineStart, yyTabSpace - 1 - (yyChBufferIndex - yyLineStart - 2) % yyTabSpace);
  1657. }
  1658.  
  1659. static void yyTab1
  1660. # ifdef __STDC__
  1661. (INTEGER a)
  1662. # else
  1663. (a)
  1664. INTEGER a;
  1665. # endif
  1666. {
  1667.   DEC1(yyLineStart, yyTabSpace - 1 - (yyChBufferIndex - yyLineStart - Scanner_TokenLength + a - 1) % yyTabSpace);
  1668. }
  1669.  
  1670. static void yyTab2
  1671. # ifdef __STDC__
  1672. (INTEGER a, INTEGER b)
  1673. # else
  1674. (a, b)
  1675. INTEGER a, b;
  1676. # endif
  1677. {
  1678.   DEC1(yyLineStart, yyTabSpace - 1 - (yyChBufferIndex - yyLineStart - Scanner_TokenLength + a - 1) % yyTabSpace);
  1679. }
  1680.  
  1681. static void yyEol
  1682. # ifdef __STDC__
  1683. (INTEGER Column)
  1684. # else
  1685. (Column)
  1686. INTEGER Column;
  1687. # endif
  1688. {
  1689.   INC(yyLineCount);
  1690.   yyLineStart = yyChBufferIndex - 1 - Column;
  1691. }
  1692.  
  1693. static void output
  1694. # ifdef __STDC__
  1695. (CHAR c)
  1696. # else
  1697. (c)
  1698. CHAR c;
  1699. # endif
  1700. {
  1701.   IO_WriteC((System_tFile)IO_StdOutput, c);
  1702. }
  1703.  
  1704. static void unput
  1705. # ifdef __STDC__
  1706. (CHAR c)
  1707. # else
  1708. (c)
  1709. CHAR c;
  1710. # endif
  1711. {
  1712.   DEC(yyChBufferIndex);
  1713.   yyChBufferPtr->A[yyChBufferIndex] = c;
  1714. }
  1715.  
  1716. static CHAR input
  1717. # ifdef __STDC__
  1718. ()
  1719. # else
  1720. ()
  1721. # endif
  1722. {
  1723.   if (yyChBufferIndex == yyChBufferStart + yyBytesRead) {
  1724.     if (!yyEof) {
  1725.       DEC1(yyLineStart, yyBytesRead);
  1726.       yyChBufferIndex = 0;
  1727.       yyChBufferStart = 0;
  1728.       yyBytesRead = Source_GetLine(yySourceFile, (ADDRESS)yyChBufferPtr, (LONGCARD)General_Exp2(General_Log2(yyChBufferSize)));
  1729.       if (yyBytesRead <= 0) {
  1730.         yyBytesRead = 0;
  1731.         yyEof = TRUE;
  1732.       }
  1733.       yyChBufferPtr->A[yyBytesRead] = yyEobCh;
  1734.       yyChBufferPtr->A[yyBytesRead + 1] = '\0';
  1735.     }
  1736.   }
  1737.   if (yyChBufferIndex == yyChBufferStart + yyBytesRead) {
  1738.     return '\0';
  1739.   } else {
  1740.     INC(yyChBufferIndex);
  1741.     return yyChBufferPtr->A[yyChBufferIndex - 1];
  1742.   }
  1743. }
  1744.  
  1745. void Scanner_BeginScanner
  1746. # ifdef __STDC__
  1747. ()
  1748. # else
  1749. ()
  1750. # endif
  1751. {
  1752.   NestingLevel = 0;
  1753. }
  1754.  
  1755. void Scanner_CloseScanner
  1756. # ifdef __STDC__
  1757. ()
  1758. # else
  1759. ()
  1760. # endif
  1761. {
  1762. }
  1763.  
  1764. static void yyGetTables
  1765. # ifdef __STDC__
  1766. ()
  1767. # else
  1768. ()
  1769. # endif
  1770. {
  1771.   CARDINAL BlockSize, j, n;
  1772.   System_tFile TableFile;
  1773.   yyStateRange i;
  1774.   struct S_13 Base;
  1775.  
  1776.   BlockSize = 64000 / sizeof(yyCombType);
  1777.   TableFile = OpenInput(Scanner_ScanTabName.A, 128L);
  1778.   Checks_ErrorCheck((STRING)"yyGetTables.OpenInput", 21L, TableFile);
  1779.   if (yyGetTable(TableFile, ADR(Base)) / sizeof(yyTableElmt) - 1 != yyDStateCount || yyGetTable(TableFile, ADR(yyDefault)) / sizeof(yyTableElmt) - 1 != yyDStateCount || yyGetTable(TableFile, ADR(yyEobTrans)) / sizeof(yyTableElmt) - 1 != yyDStateCount) {
  1780.     yyErrorMessage(2);
  1781.   }
  1782.   n = 0;
  1783.   j = 0;
  1784.   while (j <= yyTableSize) {
  1785.     INC1(n, yyGetTable(TableFile, ADR(yyComb.A[j])) / sizeof(yyCombType));
  1786.     INC1(j, BlockSize);
  1787.   }
  1788.   if (n != yyTableSize + 1) {
  1789.     yyErrorMessage(2);
  1790.   }
  1791.   Close(TableFile);
  1792.   for (i = 0; i <= yyDStateCount; i += 1) {
  1793.     yyBasePtr.A[i] = (LONGCARD)ADR(yyComb.A[Base.A[i]]);
  1794.   }
  1795. }
  1796.  
  1797. static CARDINAL yyGetTable
  1798. # ifdef __STDC__
  1799. (System_tFile TableFile, ADDRESS Address)
  1800. # else
  1801. (TableFile, Address)
  1802. System_tFile TableFile;
  1803. ADDRESS Address;
  1804. # endif
  1805. {
  1806.   INTEGER N;
  1807.   yyTableElmt Length;
  1808.  
  1809.   N = Read(TableFile, ADR(Length), (LONGINT)sizeof(yyTableElmt));
  1810.   Checks_ErrorCheck((STRING)"yyGetTable.Read1", 16L, N);
  1811.   N = Read(TableFile, Address, (LONGINT)Length);
  1812.   Checks_ErrorCheck((STRING)"yyGetTable.Read2", 16L, N);
  1813.   return Length;
  1814. }
  1815.  
  1816. static void yyErrorMessage
  1817. # ifdef __STDC__
  1818. (SHORTCARD ErrorCode)
  1819. # else
  1820. (ErrorCode)
  1821. SHORTCARD ErrorCode;
  1822. # endif
  1823. {
  1824.   Positions_WritePosition((System_tFile)IO_StdError, Scanner_Attribute.Position);
  1825.   switch (ErrorCode) {
  1826.   case 0:;
  1827.     IO_WriteS((System_tFile)IO_StdError, (STRING)": Scanner: internal error", 25L);
  1828.     break;
  1829.   case 1:;
  1830.     IO_WriteS((System_tFile)IO_StdError, (STRING)": Scanner: out of memory", 24L);
  1831.     break;
  1832.   case 2:;
  1833.     IO_WriteS((System_tFile)IO_StdError, (STRING)": Scanner: table mismatch", 25L);
  1834.     break;
  1835.   case 3:;
  1836.     IO_WriteS((System_tFile)IO_StdError, (STRING)": Scanner: too many nested include files", 40L);
  1837.     break;
  1838.   case 4:;
  1839.     IO_WriteS((System_tFile)IO_StdError, (STRING)": Scanner: file stack underflow (too many calls of CloseFile)", 61L);
  1840.     break;
  1841.   }
  1842.   IO_WriteNl((System_tFile)IO_StdError);
  1843.   (*Scanner_Exit)();
  1844. }
  1845.  
  1846. static void yyExit
  1847. # ifdef __STDC__
  1848. ()
  1849. # else
  1850. ()
  1851. # endif
  1852. {
  1853.   IO_CloseIO();
  1854.   Exit(1L);
  1855. }
  1856.  
  1857. void BEGIN_Scanner()
  1858. {
  1859.   static BOOLEAN has_been_called = FALSE;
  1860.  
  1861.   if (!has_been_called) {
  1862.     has_been_called = TRUE;
  1863.  
  1864.     BEGIN_Strings();
  1865.     BEGIN_StringMem();
  1866.     BEGIN_Idents();
  1867.     BEGIN_Texts();
  1868.     BEGIN_Positions();
  1869.     BEGIN_Checks();
  1870.     BEGIN_System();
  1871.     BEGIN_General();
  1872.     BEGIN_Positions();
  1873.     BEGIN_IO();
  1874.     BEGIN_DynArray();
  1875.     BEGIN_Strings();
  1876.     BEGIN_Source();
  1877.     BEGIN_System();
  1878.     BEGIN_StringMem();
  1879.     BEGIN_Strings();
  1880.     BEGIN_Idents();
  1881.     BEGIN_Texts();
  1882.     BEGIN_Tree();
  1883.     BEGIN_Sets();
  1884.     BEGIN_Positions();
  1885.     BEGIN_Errors();
  1886.  
  1887.     (void)strncpy((char *)Scanner_ScanTabName.A, "Scanner.Tab", sizeof(Scanner_ScanTabName.A));
  1888.     Scanner_Exit = yyExit;
  1889.     yyFileStackPtr = 0;
  1890.     yyStartState = 1;
  1891.     yyPreviousStart = 1;
  1892.     yyBasePtr.A[yyStartState] = (LONGCARD)ADR(yyComb.A[0]);
  1893.     yyDefault.A[yyStartState] = yyDNoState;
  1894.     yyComb.A[0].Check = yyDNoState;
  1895.     yyChBufferPtr = (yytChBufferPtr)ADR(yyComb.A[0]);
  1896.     yyChBufferIndex = 1;
  1897.     yyStateStackSize = yyInitBufferSize;
  1898.     DynArray_MakeArray((ADDRESS *)&yyStateStack, &yyStateStackSize, (LONGINT)sizeof(yyStateRange));
  1899.     yyStateStack->A[0] = yyDNoState;
  1900.     for (yyCh = yyFirstCh; yyCh <= yyLastCh; yyCh += 1) {
  1901.       yyToLower.A[yyCh] = yyCh;
  1902.     }
  1903.     yyToUpper = yyToLower;
  1904.     for (yyCh = 'A'; yyCh <= 'Z'; yyCh += 1) {
  1905.       yyToLower.A[yyCh] = CHR(ORD(yyCh) - ORD('A') + ORD('a'));
  1906.     }
  1907.     for (yyCh = 'a'; yyCh <= 'z'; yyCh += 1) {
  1908.       yyToUpper.A[yyCh] = CHR(ORD(yyCh) - ORD('a') + ORD('A'));
  1909.     }
  1910.   }
  1911. }
  1912.